package site.wetsion.employ.server.mapper;

import java.math.BigInteger;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import site.wetsion.employ.server.pojo.CollectionCompany;
import site.wetsion.employ.server.pojo.CollectionJob;
import site.wetsion.employ.server.pojo.CollectionPost;
import site.wetsion.employ.server.pojo.Company;
import site.wetsion.employ.server.pojo.ForumPost;
import site.wetsion.employ.server.pojo.Job;

public interface CollectionMapper {
	
	public void insertCollectionJob(CollectionJob collectionJob) throws Exception;
	
	public void insertCollectionCompany(CollectionCompany collectionCompany) throws Exception;
	
	public void insertCollectionPost(CollectionPost collectionPost) throws Exception;
	
	public CollectionJob getCollectionJobByUidAndJobId(
			@Param("userId") BigInteger userId, 
			@Param("jobId") BigInteger jobId) throws Exception;
	
	public CollectionCompany getCollectionCompanyByUidAndCompanyId(
			@Param("userId") BigInteger userId, 
			@Param("companyId") BigInteger companyId) throws Exception;
	
	public CollectionPost getCollectionPostByUidAndPostId(
			@Param("userId") BigInteger userId, 
			@Param("postId") BigInteger postId) throws Exception;
	
	
	public List<ForumPost> getCollectionPostListByUid(
			@Param("userId") BigInteger userId, 
			@Param("page") int page, 
			@Param("pageSize") int pageSize) throws Exception;
	
	public int getCountOfCollectionPostByUid(BigInteger userId) throws Exception;

	public List<Job> getCollectionJobListByUid(
			@Param("userId") BigInteger userId, 
			@Param("page") int page, 
			@Param("pageSize") int pageSize) throws Exception;
	
	public int getCountOfCollectionJobByUid(BigInteger userId) throws Exception;

	public List<Company> getCollectionCompanyListByUid(
			@Param("userId") BigInteger userId, 
			@Param("page") int page, 
			@Param("pageSize") int pageSize) throws Exception;

	public int getCountOfCollectionCompanyByUid(BigInteger userId) throws Exception;

	
	public void deleteCollectionPost(
			@Param("userId") BigInteger userId, 
			@Param("postId") BigInteger postId) throws Exception;
	
	public void deleteCollectionJob(
			@Param("userId") BigInteger userId, 
			@Param("jobId") BigInteger postId) throws Exception;
	
	public void deleteCollectionCompany(
			@Param("userId") BigInteger userId, 
			@Param("companyId") BigInteger companyId) throws Exception;
	
}
